The WINDOWS, Version 3.1, Operating System, sold by Microsoft Corporation of Redmond, Washington, provides resources to application programs for generating windows on a visual display. In particular, the operating system provides bitmaps for the window elements. As a result, every window that is generated by the application programs has a similar appearance. In order to understand what kind of bitmaps the operating system stores for window elements, it is helpful to first review what kind of elements are typically included in a window.
FIG. 1 shows an example of a typical window 10 generated by an application program. The window 10 includes a system menu box 12, which may be opened by a user to display a list of system commands available to the user. The window 10 also includes a caption or title bar 14 that displays a title or a caption for the application program that is executing. A menu bar 16 is included in the window 10 to display application commands that the user may perform in the current application. A minimize button 18 and a maximize button 20 are also provided in the window 10 to allow a user to minimize or maximize the size of the window. When maximized, the window 10 occupies most of the video display screen. When minimized, the window 10 appears as an icon. The window 10 also includes a sizing border 22 which may be dragged using a pointing device, such as a mouse, to adjust the size of the window 10. The window 10 additionally includes a client area 24 in which the application program may display output.
The window 10, likewise, includes scroll bars 26 for scrolling through the contents of a document that is displayed in the client area 24. A vertical scroll bar and a horizontal scroll bar are included in the window 10 of FIG. 1. Each of the scroll bars 26 includes a scroll box or a thumb 29 that travels the length of the scroll bar to indicate the current position of the displayed document that is shown in the client area 24 relative to the entire contents of the document being displayed. Scroll bar arrows 28 are provided at each end of the scroll bars 26. A user may click a mouse on the arrows at the respective ends to scroll the contents displayed on the screen in the direction of the arrow.
The operating system provides bitmaps for the system menu button 12, the minimize button 18, the maximize button 20, scroll bar arrows 28, and any check boxes, radio buttons, menu arrows or menu check marks that are included in the window. When the window 10 is resized, such as through dragging of sizing border 22 as described above, the window elements provided by the operating system do not change in size (except that in certain instances, the height of the vertical scroll bar 26 and the length of the horizontal scroll bar may change). Since these window elements provided by the operating system do not change when the window 10 is resized, the bitmaps for the window elements do not need to be updated after the window is resized.
FIG. 2 is a flowchart illustrating the steps that are performed by the operating system to allow application programs to use the bitmaps for the system-provided elements of a window. The bitmaps are initially stored in a display driver for the video display. The display driver is typically part of the operating system and must comply with standards that permit its use in the operating system. During initialization of the operating system, the display driver is loaded into memory (step 30). The bitmaps held in the display driver are then transferred using the BitBlt() function into a cache (step 32). Subsequently, when an application program wishes to draw a window on the video display, the application program retrieves the bitmaps from the cache and uses the bitmaps to draw the system-provided window elements (step 34).